com.jproxy.proxy
Class TunnelInvocationHandler
java.lang.Object
|
+--com.jproxy.proxy.TunnelInvocationHandler
- All Implemented Interfaces:
- java.io.Serializable
- public class TunnelInvocationHandler
- extends java.lang.Object
- implements java.io.Serializable
Implementation of InvocationHandler used by DynamicProxyStub.
The class implements handler for remote interface.
All methods of remote interface are delegated to the handler.
The class supports packaging requests with DataStack.
It also recognizes Callbacks and creates for them proxies stubs.
The class is used by client and created by Tunneling server.
- See Also:
Invocator
,
Tunnel
,
Proxy
, Serialized Form
Field Summary |
java.lang.Object |
object
URL of Tunneling server that created the object |
Constructor Summary |
TunnelInvocationHandler(java.lang.String[] _interfaceNames,
long _objectId,
java.lang.String _objectClassName,
Tunnel _tunnel)
Constructor for TunnelInvocationHandler |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
object
public transient java.lang.Object object
- URL of Tunneling server that created the object
TunnelInvocationHandler
public TunnelInvocationHandler(java.lang.String[] _interfaceNames,
long _objectId,
java.lang.String _objectClassName,
Tunnel _tunnel)
throws TunnelException
- Constructor for TunnelInvocationHandler
- Parameters:
interfaceNames
- the names of remote interfaces for which methods are delegated to the handlerobjectId
- embedded remote object idclientUrl
- URL of clienttunnel
- Tunnel object
setTunnelInvocationInterceptor
public static void setTunnelInvocationInterceptor(TunnelInvocationInterceptor interceptor)
getTunnelInvocationInterceptor
public static TunnelInvocationInterceptor getTunnelInvocationInterceptor()
invoke
public java.lang.Object invoke(Tunnelizable proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- The implementation of InvocationHandler
Processes a method invocation on a proxy instance and returns the result.
The method implements virtual method for Object class of the stub.
- Parameters:
proxy
- the proxy instance that the method was invoked onmethod
- the Method instance corresponding to the interface method invoked on the proxyargs
- an array of objects containing the values of the arguments passed in the method
getObjectId
public long getObjectId()
- Tunnelizable implementation
getTunnel
public Tunnel getTunnel()
- Tunnelizable implementation
getInterfaceNames
public java.lang.String[] getInterfaceNames()
- Tunnelizable implementation
getObjectClassName
public java.lang.String getObjectClassName()
invokeMethod
public java.lang.Object invokeMethod(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- The method delegates calls to Tunnel object.
The method supports packaging requests with DataStack.
It also recognizes Callbacks and creates for them proxies stubs.
- Parameters:
proxy
- Proxy stub objectmethod
- reflected method of the proxyargs
- arguments for method call
Copyright ⌐ JProxy LLC. All Rights Reserved.